Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OS Agnostic Temporary Directory #368

Merged
merged 1 commit into from
Jul 8, 2023
Merged

Conversation

sweep-nightly[bot]
Copy link
Contributor

@sweep-nightly sweep-nightly bot commented Jul 8, 2023

This PR addresses issue #367, which pointed out that the current implementation of the temporary directory in sweepai/app/ui.py is not compatible with Windows.

The Python os module provides a function os.path.join(tempfile.gettempdir(), repo_full_name) that can be used to create a temporary directory that is OS agnostic. This function has been used to replace the current usage of "/tmp/" + repo_full_name in the get_files function.

This change ensures that Sweep can be used across different operating systems without encountering issues related to the creation of temporary directories.

Fixes #367.

To checkout this PR branch, run the following command in your terminal:

git checkout sweep/os-agnostic-temp-dir

Copy link
Contributor Author

@sweep-nightly sweep-nightly bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes required. Good job on the improvements, especially replacing the hardcoded "/tmp/" directory with a dynamically generated temporary directory. Keep it up!

@wwzeng1 wwzeng1 merged commit 8f99cd7 into main Jul 8, 2023
2 checks passed
@wwzeng1 wwzeng1 deleted the sweep/os-agnostic-temp-dir branch July 8, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Use os agnostic temp directory for windows
1 participant